
package com.pengtu.gsj.entity.lzgl;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.pengtu.gsj.entity.app.Attachment;
import com.pengtu.gsj.entity.base.IdEntity;

@Entity
@Table(name = "T_LZ_ROADINFOSYS")
public class RoadInfoSys extends IdEntity{

	/**
	 * serialVersionUID:TODO
	 *
	 * @since 1.0.0
	 */
	private static final long serialVersionUID = -4457115081371450709L;

	private String infoSysName;  // 信息化系统名称
	
	private String signOrg;     //系统建设单位
	
	private String year;	   //系统建设年份
	
	private String ifImplNet;  //能否实现网上办事和网上监督
	
	private String remark; 	   // 备注
	
	private Integer bulletinNumber;  //检测文件数
	
	private List<Attachment> attachments;  //加载附件


	@Column(name = "INFOSYSNAME")
	public String getInfoSysName() {
		return infoSysName;
	}

	public void setInfoSysName(String infoSysName) {
		this.infoSysName = infoSysName;
	}

	
	@Column(name = "SIGNORG")
	public String getSignOrg() {
		return signOrg;
	}

	public void setSignOrg(String signOrg) {
		this.signOrg = signOrg;
	}

	
	@Column(name = "YEAR")
	public String getYear() {
		return year;
	}

	public void setYear(String year) {
		this.year = year;
	}

	@Column(name = "IFIMPLNET")
	public String getIfImplNet() {
		return ifImplNet;
	}

	public void setIfImplNet(String ifImplNet) {
		this.ifImplNet = ifImplNet;
	}

	
	@Column(name = "REMARK")
	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@Transient
	public Integer getBulletinNumber() {
		bulletinNumber = attachments.size();
		return bulletinNumber;
	}

	public void setBulletinNumber(Integer bulletinNumber) {
		this.bulletinNumber = bulletinNumber;
	}

	@OneToMany(fetch = FetchType.LAZY)
	@JoinColumn(name = "PARTID")
	public List<Attachment> getAttachments() {
		return attachments;
	}

	public void setAttachments(List<Attachment> attachments) {
		this.attachments = attachments;
	}
}